pkgname=unixbench
pkgver=git
pkgrel=1
url='https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/byte-unixbench/UnixBench5.1.3.tgz'
arch=('i386' 'x86_64' 'riscv64')
license=('GPL')
depends_debian_11=(perl)
makedepends_debian_11=(libperl-dev)
source=('https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/byte-unixbench/UnixBench5.1.3.tgz')
md5sums=('SKIP')

build()
{
	cd $srcdir/UnixBench
	sed -i $'s/"System Benchmarks", \'maxCopies\' => 16/"System Benchmarks", \'maxCopies\' => 256/g' ./Run
	sed -i $'s/"Non-Index Benchmarks", \'maxCopies\' => 16/"Non-Index Benchmarks", \'maxCopies\' => 256/g' ./Run
	make
}

package()
{
	benchmark_path="${pkgdir}/lkp/benchmarks/${pkgname}"
	mkdir -p $benchmark_path
	cp -af "$srcdir/UnixBench/"* $benchmark_path
}
